
<div id="conte-middle">
	<section class="posts">
<?php
	if(isset($season)){
		$url_article = base_url($lang_url.'series~'.$season['id_season'].'~'.$season['clean_title'].'~temporada~'.$season['no_season']);
?>
		<article>
			<header>
				<h1><?php echo $seo['title2']; ?></h1>
				<p><?php echo lang('v_posted_by'); ?> <span><?php echo $season['posted_by']; ?></span></p>
			</header>
			<div class="post-conte">
				<div class="post-poster float-l">
					<img src="<?php echo $season['url_poster_big']; ?>" width="277" height="312" />
					<span><?php echo $season['type']; ?></span>
				</div>
				
				<div class="post-info float-r">
					<nav>
						<ul>
						<?php
							$url_cat = '';
							foreach ($season['categories'] as $keyc => $categorie) {
						 		echo '<li><a href="'.Sys::$url_base.$lang_url.'series~'.$categorie['id'].'/'.'"'.($keyc==0?' class="first"': '').'>'.$categorie['name'].'</a></li>';
							}
						?>
						</ul>
						<div class="clear"></div>
					</nav>
					
					<div class="info">
						<table class="tbl-info">
							<tr>
								<td class="hed"><?php echo lang('v_release_date'); ?></td>
								<td><?php echo $season['date_release']; ?></td>
							</tr>
							<tr>
								<td class="hed"><?php echo lang('v_actors'); ?></td>
								<td><?php //Nombres de los servidores
								if(is_array($season['cast'])){
									$ser = '';
									foreach($season['cast'] as $keys => $source){
										$ser .= ', <a href="'.Sys::$url_base.$lang_url.'actors~'.$source['id'].'/'.'" class="reparto" title="'.$source['name'].'">'.$source['name'].'</a>';
									}
									echo substr($ser, 1);
								}
								?></td>
							</tr>
						</table>
						
						<nav class="seasons">
							<strong class="mini-subtitle"><?php echo lang('v_season') ?>s</strong>
						<?php
							if(is_array($season['seasons'])){
								$ser = '';
								foreach($season['seasons'] as $keys => $source){
									if($sub_segment == $source['no_season'])
										$ser .= ', <span>'.lang('v_season').' '.$source['no_season'].'</span>';
									else
										$ser .= ', <a href="'.base_url($lang_url.'series~'.$source['id'].'~'.$season['clean_title'].'~temporada~'.
												$source['no_season']).'" class="reparto">'.lang('v_season').' '.$source['no_season'].'</a>';
								}
								echo substr($ser, 1);
							} 
						?>
							
						</nav>
						
						<div class="share">
							<div class="share-twit">
								<a href="https://twitter.com/share" class="twitter-share-button" data-count="vertical" data-lang="<?php echo $lang_m; ?>">Tweet</a>
								<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
							</div>
							
							<div class="share-plus">
								<!-- Place this tag where you want the +1 button to render -->
								<g:plusone size="tall" href="<?php echo $url_article; ?>"></g:plusone>
								
								<!-- Place this render call where appropriate -->
								<script type="text/javascript">
								  window.___gcfg = {lang: '<?php echo $lang_m; ?>'};
								
								  (function() {
								    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
								    po.src = 'https://apis.google.com/js/plusone.js';
								    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
								  })();
								</script>
							</div>
							<div class="share-face">
								<?php $face_lang = $lang_m.($lang_m=='es'? '_LA': '_US'); ?>
								<div id="fb-root"></div>
								<script>(function(d, s, id) {
								  var js, fjs = d.getElementsByTagName(s)[0];
								  if (d.getElementById(id)) {return;}
								  js = d.createElement(s); js.id = id;
								  js.src = "//connect.facebook.net/<?php echo $face_lang; ?>/all.js#xfbml=1&appId=298068703552361";
									  fjs.parentNode.insertBefore(js, fjs);
									}(document, 'script', 'facebook-jssdk'));</script>
								<div class="fb-like" data-href="<?php echo $url_article; ?>" data-send="false" data-layout="box_count" data-width="20" data-show-faces="false"></div>
							</div>
						</div>
					</div>
				</div>
				<div class="clear"></div>
				<strong class="mini-subtitle"><?php echo lang('v_synopsis') ?></strong>
				<p class="sinop"><?php //Sinopsis
						echo ($lang != 'spa'? $season['synopsis_'.$lang]: $season['synopsis_spa']); ?></p>
			</div>
			
			<div class="post-extra">
				<nav class="episodes">
					<strong class="mini-subtitle"><?php echo lang('v_episode') ?>s</strong>
					<ul>
			<?php
				if(is_array($season['episodes'])){
					$ser = '';
					foreach($season['episodes'] as $keys => $source){
						echo '<li><a href="'.base_url($lang_url.'series~'.$source['id'].'~'.$season['clean_title'].'~'.$source['clean_title']).
							'" class="reparto">'.lang('v_episode').' '.$source['no_episode'].' - '.$source['title'].'</a></li>';
					}
				} 
			?>
					</ul>
				</nav>
				
				<div class="clear"></div>
				<div class="comments_face">
					<strong class="mini-subtitle"><?php echo lang('v_comments') ?></strong>
					<div id="fb-root"></div>
					<script>(function(d, s, id) {
					  var js, fjs = d.getElementsByTagName(s)[0];
					  if (d.getElementById(id)) {return;}
					  js = d.createElement(s); js.id = id;
					  js.src = "//connect.facebook.net/<?php echo $face_lang; ?>/all.js#xfbml=1&appId=298068703552361";
					  fjs.parentNode.insertBefore(js, fjs);
					}(document, 'script', 'facebook-jssdk'));</script>
					<div class="fb-comments" data-href="<?php echo $url_article; ?>" data-num-posts="30" data-width="640"></div>
				</div>
			</div>
		</article>
<?php
	}
?>
		
	</section>

